<?php
function echo_admin_menu_items ($items, $active_page = NULL)
{
	foreach ($items as $key => $value)
	{
		$title = (isset($value['title'])) ? $value['title'] : 'Undefined';
		echo '<li>' . anchor('admin/page/'.$key, $title) . '</li>';
		
		if (isset($value['items']))
		{
			echo '<ul>';
			echo_admin_menu_items($value['items']);
			echo '</ul>';
		}
	}
}
?>